package com.sixth.dao;

import com.sixth.entity.Stafftransfer;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface StafftransferDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Stafftransfer record);

    int insertSelective(Stafftransfer record);

    Stafftransfer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Stafftransfer record);

    int updateByPrimaryKey(Stafftransfer record);

    /**
     *
     * @param staffid
     * @param branchid
     * @param deptid
     * @param newbranchid
     * @param newdeptid
     * @param applytime
     * @param applyid
     * @param state
     * @return
     */
    int insertByContent(@Param("staffid")Integer staffid , @Param("branchid")Integer branchid , @Param("deptid")Integer deptid, @Param("newbranchid")Integer newbranchid,@Param("newdeptid") Integer newdeptid,@Param("applytime") Date applytime,@Param("applyid") Integer applyid,@Param("state") Integer state);

    //查询所有审核信息
    List<Stafftransfer> getAll(@Param("newbranchid") Integer newbranchid);
    //员工平调审核通过
    Integer ExPass(@Param("id") Integer id, @Param("extime") Date extime, @Param("exid") Integer exid);
    //审核驳回
    Integer ExReject(@Param("id") Integer id, @Param("extime") Date extime, @Param("exid") Integer exid);

    //判断员工是否处于调动状态
    Stafftransfer geteditIngstaff(Integer staffid);
}